#include <REGX52.H>
#include <INTRINS.H>

void Delay(int time);

void main(){
	while(1){
		P2=0xFE;
		Delay(200);
		P2=0xFD;
		Delay(200);
		P2=0xFB;
		Delay(200);
		P2=0xF7;
		Delay(200);
		P2=0xEF;
		Delay(200);
		P2=0xDF;
		Delay(200);
		P2=0xBF;
		Delay(200);
		P2=0x7F;
		Delay(200);
	}
}

void Delay(int time)		//@12.000MHz
{
	unsigned char i, j;

	i = 2 * time;
	j = 239 * time;
	do
	{
		while (--j);
	} while (--i);
}